package com.itheima.job;

import com.itheima.dao.OrderSettingDao;
import com.itheima.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;


@Transactional
public class ClearOrderSettingJob {

    @Autowired
    OrderSettingDao orderSettingDao;

    public void ClearOrderSettingData() throws Exception {
        //定时任务开启时，删除数据库数据的时间
        String date = DateUtils.parseDate2String(new Date());

        orderSettingDao.deleteOrderSettingData(date);
    }

}
